﻿using MediatR;

namespace QuartzServices.Domain.Core.Events
{
    /// <summary>
    /// 抽象类Message，用来获取我们事件执行过程的类名
    /// 然后添加聚合根
    /// </summary>
    public abstract class Message : IRequest<bool>
    {
        public string MessageType { get; protected set; }

        public Guid AggregateId { get;protected set; }

        protected Message() 
        {
            MessageType = GetType().Name;
        }
    }
}
